package doan.chuyennganh.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.EditText;
import android.widget.RelativeLayout;
import doan.chuyennganh.activity.R;

public class SearchingView extends RelativeLayout {

	private LayoutInflater layoutInflater;
	private Context context;
	
	public SearchingView(Context context, AttributeSet attrs) {
		super(context, attrs);
		this.context = context;
		layoutInflater = LayoutInflater.from(context);
		init();
	}

	public SearchingView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		this.context = context;
		layoutInflater = LayoutInflater.from(context);
		init();
	}

	public SearchingView(Context context) {
		super(context);
		this.context = context;
		layoutInflater = LayoutInflater.from(context);
		init();
	}

	private void init() {
		layoutInflater.inflate(R.layout.searching_view, this);
	}
	public void setTextHint(String text) {
		EditText edt = (EditText) findViewById(R.id.search_editext);
		edt.setHint(context.getString(R.string.txt_search_student_by_id));
	}
	public String getText() {
		EditText edt = (EditText) findViewById(R.id.search_editext);
		return edt.getText().toString();
	}
}
